package com.hele.sts.pub;

import com.hele.sts.dao.BMCxqxDao;

public class CodeUtils {

	public static final String VALUE_NOT_FOUND = "未知";
	
	public static String codeToName(CodeCategory category,String name){
		if(name==null) {
			return VALUE_NOT_FOUND;
		}
		String value;
		switch (category) {
		case CXQX:
//			value = Constants.cxqxMap.get(name);
			value = BMCxqxDao.getCxqx(name);
			break;
		case USER_STATUS:
			value = Constants.userStatusMap.get(name);
			break;
		case YHSF:
			value = Constants.yhsfMap.get(name);
			break;
		case CXMD:
			value = Constants.cxmdMap.get(name);
			break;
		case ERRCHECK:
			value = Constants.errCheckMap.get(name);
		default:
			value = VALUE_NOT_FOUND;
			break;
		}
		if(value==null) {
			value = VALUE_NOT_FOUND;
		}
		return value;
	}
}
